<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="f" uri="http://java.sun.com/jsf/core"%>
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<html>
<head>
<title>Calendar Management</title>
</head>
<link rel="stylesheet" href="../../../resources/css/fw-edit.css"
	type="text/css">
<script src="../../../script/base.js"></script>

<body>
<f:view>
	<f:loadBundle basename="net.orange.conf.lang.fw" var="msg" />
	<h:form id="myForm">
		<h:inputHidden id="pk" value="#{calendar.content.pk}" />
		<h:inputHidden id="editMode" value="#{calendar.editMode}" />
		<h:inputHidden id="year" value="#{calendar.content.year}" />
		<h:inputHidden id="month" value="#{calendar.content.month}" />
		<h:inputHidden id="day" value="#{calendar.content.day}" />
		<h:inputHidden id="week" value="#{calendar.content.week}" />

		<h:panelGrid columns="2" rowClasses="content-title"
			style="width:100%;">
			<h:outputText value="#{msg.calendar_title}." />

			<h:panelGroup style="text-align:right">
				<h:commandButton value="#{msg.common_edit}" type="submit" id="cmdEdit"
					action="#{calendar.edit}" styleClass="button-normal"
					rendered="#{not calendar.editMode}" />

				<h:commandButton value="#{msg.common_save}" type="submit" id="cmdSave"
					action="#{calendar.save}" styleClass="button-normal"
					rendered="#{calendar.editMode}" />

				<h:outputText value="    " />
				<h:commandButton value="#{msg.common_cancel}" type="submit" id="cmdCancel"
					action="#{calendar.back}" styleClass="button-normal" />
			</h:panelGroup>
		</h:panelGrid>

		<hr>

		<h:messages styleClass="content-message" />

		<h:panelGrid columns="2" styleClass="content-table"
			columnClasses="content-detail-title,content-detail">

			<h:outputLabel value="#{msg.common_pk}:" />
			<h:outputText value="#{calendar.content.pk}" />

			<h:outputLabel value="#{msg.calendar_date}:" />
			<h:inputText value="#{calendar.content.date}" disabled="true">
				<f:convertDateTime pattern="yyyy-MM-dd" />
			</h:inputText>

			<h:outputLabel value="#{msg.calendar_holiday}" />
			<h:selectBooleanCheckbox value="#{calendar.content.holiday}"
				disabled="#{not calendar.editMode}" id="holiday" />

			<h:outputLabel value="#{msg.common_description}:" />
			<h:inputText value="#{calendar.content.notes}"
				disabled="#{not calendar.editMode}" id="notes" />
		</h:panelGrid>
	</h:form>
</f:view>
</body>
</html>
